cmake_minimum_required(VERSION 2.8)
project(BuildKWStyle)

include(ExternalProject)

ExternalProject_add(KWStyle
  GIT_REPOSITORY "http://public.kitware.com/KWStyle.git"
#  GIT_TAG -- shouldn't there be a release tag? the GIT repo just
# has the head revision.
  UPDATE_COMMAND ""
  CMAKE_ARGS
  -DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}
  -DCMAKE_CXX_COMPILER_ARG1:STRING=${CMAKE_CXX_COMPILER_ARG1}
  -DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}
  -DCMAKE_C_COMPILER_ARG1:STRING=${CMAKE_C_COMPILER_ARG1}
  -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
  -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
  -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
  -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
  -DBUILD_EXAMPLES:BOOL=OFF
  -DBUILD_TESTING:BOOL=OFF
  INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
  )
